<?php

declare(strict_types=1);

namespace App\Http\Dto\Api\Test;

use App\Http\Dto\Api\User\UserDto;
use Hesb\LaravelPlus\Annotation\ApiModel;
use Hesb\LaravelPlus\Annotation\ApiModelProperty;
use Hesb\LaravelPlus\Annotation\Rule\Accepted;
use Hesb\LaravelPlus\Annotation\Rule\After;
use Hesb\LaravelPlus\Annotation\Rule\Arr;
use Hesb\LaravelPlus\Annotation\Rule\Date;
use Hesb\LaravelPlus\Annotation\Rule\DateFormat;
use Hesb\LaravelPlus\Annotation\Rule\Ip;
use Hesb\LaravelPlus\Annotation\Rule\Numeric;
use Hesb\LaravelPlus\Annotation\Rule\Required;
use Hesb\LaravelPlus\Annotation\Rule\Size;
use Hesb\LaravelPlus\Annotation\Rule\Url;

#[ApiModel('body管理')]
class TestBodyDto
{
    #[ApiModelProperty(value:'用户信息',required: true)]
    #[Required]
    public UserDto $user;

    /**
     * @var \App\Http\Dto\Api\Test\TestBodyDetailDto []
     */
    #[ApiModelProperty(value:'明细列表',required: true)]
    public array $detail_list;

    #[ApiModelProperty(value:'创建日期')]
    #[Date]
//    #[After("2025-1-1")]
//    #[DateFormat("Y-m-d H:i:s")]
    public string $create_date;

//    #[ApiModelProperty(value:'body数组')]
//    #[Arr]
//    public array $arr;
//
//    #[ApiModelProperty(value:'url地址')]
//    #[Url]
//    public string $url;

//    #[ApiModelProperty(value:'ip地址')]
//    #[Ip]
//    public string $ip;

//    #[ApiModelProperty(value:'数字')]
//    #[Numeric]
//    public string $num;

//    #[ApiModelProperty(value:'服务协议')]
//    #[Accepted]
//    public string $accept;

//    #[ApiModelProperty(value:'字符串')]
//    #[Size(value:5)]
//    public string $str;
}
